package com.crr;


import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;


@Component
public class FanoutConsumer {
    @RabbitListener(queues = "queueOne")
    public void handler1(Message message){
        System.out.println("消费者消息："+new String(message.getBody()));
    }
    @RabbitListener(queues = "queueTwo" )
    public void handler2(Message message){
        System.out.println("消费者消息："+new String(message.getBody()));
    }

}
